﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTBuilderLib.VisualHierarchyClasses;

namespace DTBuilderLib
{
    /// <summary>
    /// Some classes to help out with the placement of images, etc.
    /// </summary>
    class SceneHelpers
    {
        public static Visual getSizeRight (Visual v)
        {
            double max = v.Width;
            double h = v.Height;
            if (h > max)
                max = h;
            const double rescaleTo = 10.0F;
            if (max > rescaleTo)
                v.Scale(10.0F / max);
            return v;
        }
    }
}
